<?php 
include_once(''.P.'/public/header.html');
?>

<script type="text/javascript" src="res/bootstrapplugin/jquery-bootstable.js"></script>


<script>

function initbody(){
	
	table = $('#viewshow').bootstable({
		url:'index.php?m=agent&a=data',method:'get',celleditor:true,table:'0',
		cellurl:'index.php',fanye:false,cellurl:'index.php?m=agent&a=savecell',
		columns:[{
			text:'图标',dataIndex:'picurl',renderer:function(v){
				if(v)v='<img src="'+v+'" width="30">';
				return v;
			}
		},{
			text:'名称',dataIndex:'name',editor:true
		},{
			text:'agentkey',dataIndex:'agentkey',editor:true
		},{
			text:'回调地址',dataIndex:'callurl',editor:true,align:'left',type:'textarea'
		},{
			text:'上传类型',dataIndex:'uptype',editor:true,editormsg:'多个,分开',type:'textarea'
		},{
			text:'状态',dataIndex:'status',sortable:true,type:'checkbox',editor:true
		},{
			text:'文件数',dataIndex:'fileshu'
		},{
			text:'ID',dataIndex:'id'
		},{
			text:'',dataIndex:'opts',renderer:function(s,d){
				return '<a class="zhu" href="?m=agent&a=form&id='+d.id+'">编辑</a>&nbsp;<a class="zhu" href="javascript:;" onclick="deleterecord('+d.id+',0,false)">删</a>';
			}
		}]
		
		
	});
}
</script>
</head>

<body>

<?php 
include_once(''.P.'/public/top.html');
?>

<div align="center">

<div style="width:<?=$maxwidth?>;margin:20px 0px" align="left">
	<div style="color:#cccccc">
		<a href="?m=index" class="zhu"><?=lang('admin.home')?></a> &gt;
		<a href="" class="zhu"><?=lang('admin.agenttitle')?></a>
	</div>
	<div style="background-color:white;margin:20px 0px;border:1px #eeeeee solid;min-height:500px;border-radius:5px">
		<div style="padding:10px">
			<div style="padding:5px 0px"><a class="webbtn" style="border-radius:5px" href="?m=agent&a=form&id=0">新增</a></div>
			<div class="blank10"></div>
			<div id="viewshow"></div>
		</div>
		<div class="blank10"></div>
	</div>
</div>



<?php 
include_once(''.P.'/public/footer.html');
?>
</div>

</body>
</html>